home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / database / bdem22.zip / BDEMO010.TXT < prev    next >
Text File  |  1994-10-27  |  3KB  |  53 lines

  1. BUILDER DATABASE FUNCTIONS
  2.  
  3.  
  4. The Builder Database Functions are a Flexible and Easy to Use Set of
  5. Clipper UDFs Designed to Add/Change/Delete Database Records.
  6.  
  7.  
  8. One of the features that make them so easy to use is the ability to
  9. Add or Change databases one record at a time.  This is an advance
  10. over the normal xBase style of one FIELD at a time database I/O.
  11.  
  12. The way this is achieved is to create a STATIC array of field values for
  13. every database in your application.  A corresponding manifest constant entry
  14. is made in a Header (.CH) file for every database field in your application
  15. also.  The manifest constant is created by prefixing it with an alphabetic
  16. character.  For example, the database field CITY could become the manifest
  17. constant ACITY.  This method provides both readable source code and efficient
  18. access to database data.
  19.  
  20. The Builder Save_It() function requires four parameters in order to
  21. Add/Change/Delete/ or Recall a database record.  When adding a record
  22. you can (optionally) use the deleted records of your database as
  23. "Add Space" when using the Save_It() function.  That way recycling
  24. your deleted records instead of APPENDing BLANK to add a record.
  25. Using this feature requires that SET DELETED ON is active (Builder
  26. default) and that each database to use this feature has an open
  27. index created like: INDEX ON IF(DELE(),"*"," ") TO ...  This uses one
  28. valuable file handle per database; but the ease of maintaining data
  29. integrity and NEVER-EVER having to PACK these databases makes this
  30. an excellent solution for network database systems.
  31.  
  32. Other Builder database functions do your file maintenance chores for
  33. you, including maintaining related databases.  Do indexed searches with
  34. ISeek(), Browse databases with Plist().  Use Fld_Repl() instead of
  35. REPLACE when only a few fields need to be updated.  Fld_Repl() locks
  36. and unlocks records when used on a network.
  37.  
  38. View the samples and look at the source code, this stuff REALLY works.
  39.  
  40. Also see the following functions in the Builder library documentation:
  41.   DbStor()      - Store database fields to memory variables.
  42.   Fil_Lock()    - Lock an entire database.
  43.  
  44. The following functions are in the Builder library, but are used
  45. internally only and should not be required in any other way.
  46.   DbRepl()      - Replace a database record with memory variables.
  47.   Add_Rec()     - Append a Database Record, Network Aware
  48.   Net_Use()     - Called by Open_Fil() after error testing.
  49.                   Opens a database.
  50.   Rec_Lock()    - Lock a database record.
  51.  
  52. End of File ***
  53.